if !("ItemMap" in weapons player) then {player addweapon "ItemMap"};
if(isNil "RUM_ROE_nofire")then{RUM_ROE_nofire = []};
if(isNil "RUM_COM_Callsign")then{RUM_COM_Callsign = "Reaper 23"};
if(isNil "RUM_RADIO_MissionName")then{RUM_RADIO_MissionName = "Operation Enduring Freedom"};
if(isNil "RUM_RADIO_AssetProvider")then{RUM_RADIO_MissionName = "TACCOM"};
ROEzone = compile loadFile (RUM_PATH+"Common\ROEzone.sqf");

///////////////// LOAD COMMON FUNCTIONS ////////////////////////////
	// helo functions
	[] execVM (RUM_PATH+"Common\RUM_Helo_Fn.sqf");
	
///////////////// EDIT ARTILLERY AT YOUR OWN PERIL /////////////////
if(!isNil "RUM_ArtyBatts")then{
	RUM_Arty_serverfire = false;
	RUM_Arty_ServerScoot = [];
	if(isServer)then{
		nul = [] execVM (RUM_PATH+"Arty\executefiremission_server.sqf");
		nul = [] execVM (RUM_PATH+"Arty\serverScoot.sqf");
		{
			_bat = _x select 0;
			[_bat, RUM_Arty_SpawnShells] call BIS_ARTY_F_SetShellSpawn;
			[_bat,"HE"] call BIS_ARTY_F_LoadMapRanges;
			_vehs = synchronizedObjects _bat;
			_veh = _vehs select 0;
			_lead = leader group driver _veh;
			_units = units group _lead;
			{vehicle _x lock true;} foreach _units;
			if("scootable" in _x)then{
				[_bat,_lead] spawn {
					_bat = _this select 0;
					_lead = _this select 1;
					while{!alive _lead} do {
						_bat setpos getpos _lead;
						sleep 1;
					};
					if(true)exitwith{};
				};
			}; 
		} forEach RUM_ArtyBatts;
	};
	RUM_Arty_disstg = "0";
	RUM_Arty_dirstg = "0";
	RUM_Arty_updnstg = "0";
	RUM_Arty_totstg = "0";
	RUM_Arty_typeid = 0;
	RUM_Arty_typRid = 0;
	RUM_Arty_numRid = 0;
	RUM_Arty_timeid = 0;
	RUM_Arty_battid = 0;
	RUM_Arty_mtarid2 = 0;
	RUM_Arty_dispid = 0;
	RUM_Arty_ctarid = 0;
	RUM_Arty_colorcount = 0;
	RUM_Arty_tarpos = [0,0,0];
	execVM (RUM_PATH+"Arty\RUM_Arty_codesnippets.sqf");
};
///////////////// END ARTILLERY

///////////////// EDIT FIXED WING AT YOUR OWN PERIL /////////////////
if(!isNil "RUM_FXDAircraft")then{
	RUM_FXD_idleorstation = true;
	for [{_n=1},{_n<=(count RUM_FXDAircraft)},{_n=_n+1}] do {
		_arry = RUM_FXDAircraft select (_n-1);
		_plane = _arry select 0;
		_stg = format ["%1",_plane];
		_plane setVehicleVarName _stg;
		_plane lock true;
		removeAllweapons _plane;
		{_plane removeMagazine _x} forEach magazines _plane;
		_plane setVariable ["RUM_inFlight", false, true];
		if(RUM_FXD_Rspwn)then{
			[_plane, RUM_FXD_RspwnTime, 30, RUM_FXD_NumRspwn, true, false, "this lock true;"] execVM (RUM_PATH+"Common\vehicle_respawn.sqf");
		}else{
			_plane addEventHandler ["killed",{_this execVM (RUM_PATH+"Fxd\planeDown.sqf");}];
		};
	};
	execVM (RUM_PATH+"FXD\RUM_Fxd_codesnippets.sqf");
};
if(!isNil "RUM_FXDAircraft_onStation")then{
	{_x execVM (RUM_PATH+"Fxd\onStation_init.sqf")} forEach RUM_FXDAircraft_onStation;
};
//////////////// END FIXED WING

///////////////// EDIT ATTACK HELO AT YOUR OWN PERIL /////////////////
if(!isNil "RUM_AHelAircraft")then{
	if(isServer)then{
		nul = [] execVM (RUM_PATH+"AHel\ServerMove.sqf");
		nul = [] execVM (RUM_PATH+"AHel\ServerGunFire.sqf");
	};
	RUM_AHEL_idleorstation = true;
	for [{_n=1},{_n<=(count RUM_AHelAircraft)},{_n=_n+1}] do {
		_arry = RUM_AHelAircraft select (_n-1);
		_helo = _arry select 0;
		_stg = format ["%1",_helo];
		_helo setVehicleVarName _stg;
		if(RUM_AHEL_DriverGunnerLock)then{
			_helo lock true;
		};
		_helo setVariable ["RUM_inFlight", false, true];
		if(RUM_AHEL_Rspwn)then{
			[_helo, RUM_AHel_RspwnTime, RUM_AHEL_RspwnDesTime, RUM_AHel_NumRspwn, RUM_AHEL_RspwnDestroy, false, "this lock true;"] execVM (RUM_PATH+"Common\vehicle_respawn.sqf");
		}else{
			_helo addEventHandler ["killed",{_this execVM (RUM_PATH+"AHel\heloDown.sqf");}];
		};
	};
};
if(!isNil "RUM_AHelAircraft_onStation")then{
	{_x execVM (RUM_PATH+"AHel\onStation_init.sqf")} forEach RUM_AHelAircraft_onStation;
};
//////////////// END ATTACK HELO

///////////////// EDIT TRANSPORT HELO AT YOUR OWN PERIL /////////////////
RUM_THel_choplist = [];
if(!isNil "RUM_THelAircraft")then{
	for [{_n=1},{_n<=(count RUM_THelAircraft)},{_n=_n+1}] do {
		_arry = RUM_THelAircraft select (_n-1);
		_helo = _arry select 0;
		_stg = format ["%1",_helo];
		_helo setVehicleVarName _stg;
		if(RUM_THEL_DriverLock)then{
			_helo lockDriver true;
		};
		if(RUM_THEL_TurretLock)then{
			_cfg=configFile >> "CfgVehicles" >> typeof _helo >> "turrets";
			for [{_t=1},{_t<=count _cfg},{_t=_t+1}] do {
				_helo lockTurret [[(_t-1)], true];
			};
		};
		_helo setVariable ["RUM_inFlight", false, true];
		if(RUM_THEL_Rspwn)then{
			[_helo, RUM_THel_RspwnTime, RUM_THel_RspwnDesTime, RUM_THel_NumRspwn, RUM_THel_RspwnDestroy, false, "this lockDriver true;"] execVM (RUM_PATH+"Common\vehicle_respawn.sqf");
		}else{
			_helo addEventHandler ["killed",{_this execVM (RUM_PATH+"Transport\heloDown.sqf");}];
		};
		RUM_THel_choplist = RUM_THel_choplist + [_helo];
	};
};
//////////////// END TRANSPORT HELO

///////////////// EDIT SUPPLY AT YOUR OWN PERIL /////////////////
if(!isNil "RUM_SUPAircraft")then{
	for [{_n=1},{_n<=(count RUM_SUPAircraft)},{_n=_n+1}] do {
		_arry = RUM_SUPAircraft select (_n-1);
		_helo = _arry select 0;
		if!(_helo in RUM_THel_choplist) then {
			_stg = format ["%1",_helo];
			_helo setVehicleVarName _stg;
			_helo lockDriver true;
			_cfg=configFile >> "CfgVehicles" >> typeof _helo >> "turrets";
			for [{_t=1},{_t<=count _cfg},{_t=_t+1}] do {
				_helo lockTurret [[(_t-1)], true];
			};
			_helo setVariable ["RUM_inFlight", false, true];
			if(RUM_SUP_Rspwn)then{
				[_helo, RUM_SUP_RspwnTime, 30, RUM_SUP_NumRspwn, true, false, "this lockDriver true;"] execVM (RUM_PATH+"Common\vehicle_respawn.sqf");
			}else{
				_helo addEventHandler ["killed",{_this execVM (RUM_PATH+"Supply\heloDown.sqf");}];
			};
		};
	};
};
//////////////// END SUPPLY
if(true)exitWith{};